<script lang="ts" setup>
defineOptions({ name: 'CellOrgNode' })

const props = withDefaults(defineProps<{
  name: string
  type: string
}>(), {
  avatar: '',
  name: '',
})
</script>

<template>
  <a-space fill align="center">
    <ProIcon v-if="type === 'GROUP'">
      <icon-local-org-group-color />
    </ProIcon>
    <ProIcon v-else-if="type === 'COMPANY'">
      <icon-local-org-company-color />
    </ProIcon>
    <ProIcon v-else-if="type === 'DEPARTMENT'">
      <icon-local-org-department-color />
    </ProIcon>
    <ProIcon v-else-if="type === 'CAMPUS'">
      <icon-local-org-campus-color />
    </ProIcon>
    <span>{{ props.name }}</span>
  </a-space>
</template>

<style lang="less" scoped></style>
